<!DOCTYPE html>
<html>
<head>
<script>
(function(){
    var bp = document.createElement('script');
    var curProtocol = window.location.protocol.split(':')[0];
    if (curProtocol === 'https') {
        bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
    }
    else {
        bp.src = 'http://push.zhanzhang.baidu.com/push.js';
    }
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(bp, s);
})();
</script>
<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?d890b1f16fb364253e79c5bb20225c3a";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>


    

    

    
<!-- Baidu Tongji -->
<script>var _hmt = _hmt || []</script>
<script async src="//hm.baidu.com/hm.js?busuanzi_value_site_uv"></script>
<!-- End Baidu Tongji -->




    <meta charset="utf-8">
    <meta name="baidu-site-verification" content="FYMCShbUK8" />
    <meta name="baidu-site-verification" content="ZYRF7OxQRW" />
    <meta name="baidu-site-verification" content="cHSqtjI0PN" />
    <meta name="baidu-site-verification" content="cHSqtjI0PN" />
    <meta name="baidu-site-verification" content="cHSqtjI0PN" />
    
    
    <link rel="canonical" href="https://hhardyy.com/2018/03/11/git版本更新/">
    
    
    <title>git版本更新&amp;常用命令 | 小方块 - hhardyy.com | 复杂的坑+归其原理+了解实现规则===解决？解决成功：加油解决成功;</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    
    <meta name="theme-color" content="#958e93">
    
    
    <meta name="keywords" content="git更新,git推送失败,git常用命令">
    <meta name="description" content="今晚在推送项目的时候遇到了Git推送失败：HttpRequestException">
<meta name="keywords" content="git更新,git推送失败,git常用命令">
<meta property="og:type" content="article">
<meta property="og:title" content="git版本更新&amp;常用命令">
<meta property="og:url" content="http://yoursite.com/2018/03/11/git版本更新/index.html">
<meta property="og:site_name" content="小方块 - hhardyy.com">
<meta property="og:description" content="今晚在推送项目的时候遇到了Git推送失败：HttpRequestException">
<meta property="og:locale" content="zh-CN">
<meta property="og:image" content="http://yoursite.com/images/gitupdate/git.JPG">
<meta property="og:updated_time" content="2020-01-13T15:17:51.904Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="git版本更新&amp;常用命令">
<meta name="twitter:description" content="今晚在推送项目的时候遇到了Git推送失败：HttpRequestException">
<meta name="twitter:image" content="http://yoursite.com/images/gitupdate/git.JPG">
    
        <link rel="alternate" type="application/atom+xml" title="小方块 - hhardyy.com" href="/atom.xml">
    
    <link rel="shortcut icon" href="/hardyfavicon.ico">
    <link rel="stylesheet" href="//unpkg.com/hexo-theme-material-indigo@latest/css/style.css">
    <script>window.lazyScripts=[]</script>

    <!-- custom head -->
    

</head>

<body>
    <div id="loading" class="active"></div>

    <aside id="menu" class="hide" >
  <div class="inner flex-row-vertical">
    <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menu-off">
        <i class="icon icon-lg icon-close"></i>
    </a>
    <div class="brand-wrap" style="background-image:url(/img/paulGraham.jpg)">
      <div class="brand" style="background-color:#4154b2">
        <a href="/" class="avatar waves-effect waves-circle waves-light">
          <img src="/img/avatar.jpg">
        </a>
        <hgroup class="introduce">
          <h5 class="nickname">BingZhenhuang</h5>
          <a href="mailto:huangbingzhen@hhardyy.com" title="huangbingzhen@hhardyy.com" class="mail">huangbingzhen@hhardyy.com</a>
        </hgroup>
      </div>
    </div>
    <div class="scroll-wrap flex-col">
      <ul class="nav">
        
            <li class="waves-block waves-effect">
              <a href="/"  >
                <i class="icon icon-lg icon-home"></i>
                主页
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/archives"  >
                <i class="icon icon-lg icon-archives"></i>
                所有文章
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/tags"  >
                <i class="icon icon-lg icon-tags"></i>
                标签
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://github.com/HHardyy" target="_blank" >
                <i class="icon icon-lg icon-github"></i>
                Github
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://gitee.com/hhardyy" target="_blank" >
                <i class="icon icon-lg icon-cloud"></i>
                Gitee
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://juejin.im/user/59a26f926fb9a02487553b04"  >
                <i class="icon icon-lg icon-pencil"></i>
                掘金-圳
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://segmentfault.com/u/hhardyy"  >
                <i class="icon icon-lg icon-comments"></i>
                Segmentfault
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://codepen.io/HHardyy/" target="_blank" >
                <i class="icon icon-lg icon-codepen"></i>
                Codepen
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://www.freecodecamp.cn/hhardyy" target="_blank" >
                <i class="icon icon-lg icon-leaf"></i>
                Freecodecamp
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/友情链接"  >
                <i class="icon icon-lg icon-link"></i>
                友链
              </a>
            </li>
        
      </ul>
    </div>
  </div>
</aside>

    <main id="main">
        <header class="top-header" id="header">
    <div class="flex-row">
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light on" id="menu-toggle">
          <i class="icon icon-lg icon-navicon"></i>
        </a>
        <div class="flex-col header-title ellipsis">git版本更新&amp;常用命令</div>
        
        <div class="search-wrap" id="search-wrap">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="back">
                <i class="icon icon-lg icon-chevron-left"></i>
            </a>
            <input type="text" id="key" class="search-input" autocomplete="off" placeholder="输入感兴趣的关键字">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="search">
                <i class="icon icon-lg icon-search"></i>
            </a>
        </div>
        
        
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menuShare">
            <i class="icon icon-lg icon-share-alt"></i>
        </a>
        
    </div>
</header>
<header class="content-header post-header">

    <div class="container fade-scale">
        <h1 class="title">git版本更新&amp;常用命令</h1>
        <h5 class="subtitle">
            
                <time datetime="2018-03-10T18:02:55.000Z" itemprop="datePublished" class="page-time">
  2018-03-11
</time>


            
        </h5>
    </div>

    


</header>


<div class="container body-wrap">
    
    <aside class="post-widget">
        <nav class="post-toc-wrap" id="post-toc">
            <h4>TOC</h4>
            <ol class="post-toc"><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#远程免密推送"><span class="post-toc-number">1.</span> <span class="post-toc-text">远程免密推送</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#git常用的一些命令"><span class="post-toc-number">2.</span> <span class="post-toc-text">git常用的一些命令</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#克隆之前首先要选择克隆文件的位置（cd）"><span class="post-toc-number">2.1.</span> <span class="post-toc-text">克隆之前首先要选择克隆文件的位置（cd）</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#在对应的文件夹中添加新有项"><span class="post-toc-number">2.2.</span> <span class="post-toc-text">在对应的文件夹中添加新有项</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#用git创建仓库"><span class="post-toc-number">2.3.</span> <span class="post-toc-text">用git创建仓库</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#分支操作"><span class="post-toc-number">2.4.</span> <span class="post-toc-text">分支操作</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#合并分支"><span class="post-toc-number">2.5.</span> <span class="post-toc-text">合并分支</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#更改提交的操作"><span class="post-toc-number">2.6.</span> <span class="post-toc-text">更改提交的操作</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#推进历史"><span class="post-toc-number">2.7.</span> <span class="post-toc-text">推进历史</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#修改提交信息-git-commit-–amend"><span class="post-toc-number">2.8.</span> <span class="post-toc-text">修改提交信息 git commit –amend</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#查看master分支在最近七天内的差别"><span class="post-toc-number">2.9.</span> <span class="post-toc-text">查看master分支在最近七天内的差别</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#查看与指定日期之间的差别"><span class="post-toc-number">2.10.</span> <span class="post-toc-text">查看与指定日期之间的差别</span></a></li></ol></li></ol>
        </nav>
    </aside>
    
<article id="post-git版本更新"
  class="post-article article-type-post fade" itemprop="blogPost">

    <div class="post-card">
        <h1 class="post-card-title">git版本更新&常用命令</h1>
        <div class="post-meta">
            <time class="post-time" title="2018-03-11 02:02:55" datetime="2018-03-10T18:02:55.000Z"  itemprop="datePublished">2018-03-11</time>

            


            

        </div>
        <div class="post-content" id="post-content" itemprop="postContent">
            <p>今晚在推送项目的时候遇到了Git推送失败：HttpRequestException</p>
<p><iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width="330" height="86" src="//music.163.com/outchain/player?type=2&id=408280692&auto=0&height=66"></iframe><br><a id="more"></a><br>推送失败有可能不是项目本身的问题，因为本地开启服务器能正常跑起来，提示说是用户名找不到，原因是<a href="https://githubengineering.com/crypto-removal-notice/" target="_blank" rel="external">这是我查到的资料</a><br>可以从<a href="https://git-scm.com/" target="_blank" rel="external">下载</a>并重新安装Git的最新源代码版本。我自己是windows，所以下载适用于Windows的Git的最新（2.16.2）。这是最近维护的版本。它于18日前在2018-02-20发布，会同时更新Git Credential Manager。<br>下载安装完成之后（步骤无脑next也可以）<br>查看是否更新成功：<br><figure class="highlight javascript"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line"><span class="comment">//查看Git版本的命令</span></div><div class="line">git --version</div></pre></td></tr></table></figure></p>
<figure class="image-bubble">
                <div class="img-lightbox">
                    <div class="overlay"></div>
                    <img src="/images/gitupdate/git.JPG" alt="“查看结果”" title="">
                </div>
                <div class="image-caption">“查看结果”</div>
            </figure>
<p>这样git版本就更新完成了</p>
<h3 id="远程免密推送"><a href="#远程免密推送" class="headerlink" title="远程免密推送"></a>远程免密推送</h3><p>因为远程的代码管理是基于SSH的，Git则需要配置SSH。<br>1 、设置Git的user name和email<br><figure class="highlight javascript"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">$ git config --global user.name <span class="string">"xxxx"</span>  <span class="comment">//这里是用户名</span></div><div class="line">$ git config --global user.email <span class="string">"xx@xxx"</span>  <span class="comment">//这里是邮箱</span></div></pre></td></tr></table></figure></p>
<p>2、配置SSH密钥：<br>1）查看是否生成过ssh秘钥，路径是c盘下面的.ssh文件夹（没有说明没生成过秘钥）,有的话备份再删除因为一会会生成新的<br>2）生成密钥：<br><figure class="highlight javascript"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ ssh-keygen -t rsa -C “xxx@xx”</div></pre></td></tr></table></figure></p>
<p>按回车，得到id_rsa和id_rsa.pub（这两文件是生成在.ssh里头的）<br>4）登录github添加“id_rsa.pub”里面的公钥。<br>5）测试：ssh git@github.com<br>到这里如果成功的话，下次再次提交文件就可以免密提交了</p>
<h3 id="git常用的一些命令"><a href="#git常用的一些命令" class="headerlink" title="git常用的一些命令"></a>git常用的一些命令</h3><p>基础命令<br><figure class="highlight javascript"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div><div class="line">28</div><div class="line">29</div><div class="line">30</div><div class="line">31</div><div class="line">32</div><div class="line">33</div><div class="line">34</div></pre></td><td class="code"><pre><div class="line">git init初始化</div><div class="line"></div><div class="line">git add添加到暂存区，多个文件用,隔开，全部文件.</div><div class="line"></div><div class="line">git diff 查看未缓存的详细状态（本地仓库代码变化）</div><div class="line">git diff --cached查看暂存区的详细状态（暂存区里面的变化）</div><div class="line">git diff HEAD显示摘要信息</div><div class="line">git diff --stat显示摘要而非整个diff</div><div class="line"></div><div class="line">git commit -m <span class="string">"注释"</span> 提交到仓库（只提交暂存区）</div><div class="line">git commit -am <span class="string">"注释"</span> 新增并提交到仓库（无论有没有在暂存区，都提交）</div><div class="line"></div><div class="line">git reset HEAD取消已缓存的内容（取消之前的git add 添加，如果commit过的话就只能回滚了）</div><div class="line"></div><div class="line">git rm删除</div><div class="line"></div><div class="line">git mv重命名</div><div class="line"></div><div class="line">git branch 浏览仓库的所有分支</div><div class="line">git branch bug新建名为bug的分支</div><div class="line">git branch -d branchname 删除分支</div><div class="line"></div><div class="line">git checkout切换分支（切换至master之外的分支之后可以选择增加文件提交，然后再切换回master分支进行合并）</div><div class="line">虽然同一个目录下，但是git分支不一样，显示的文件也不一样</div><div class="line"></div><div class="line"></div><div class="line">git merge合并分支（一般是分支合并到主分支，git checkout master，然后git merge 分支名）</div><div class="line"></div><div class="line">git log提交日志</div><div class="line">git log --online分行显示简要信息</div><div class="line"></div><div class="line">git tag -a v1<span class="number">.0</span>编辑模式输入版本的说明信息，:wq保存退出</div><div class="line">git log --online -decorate --graph查看标签信息</div><div class="line">git tag查看历史版本</div></pre></td></tr></table></figure></p>
<h4 id="克隆之前首先要选择克隆文件的位置（cd）"><a href="#克隆之前首先要选择克隆文件的位置（cd）" class="headerlink" title="克隆之前首先要选择克隆文件的位置（cd）"></a>克隆之前首先要选择克隆文件的位置（cd）</h4><p>　　clone已有仓库<br>　　git clone git@github.com:XXX/yyyy.git //XXX为github的用户名，yyy为仓库名</p>
<h4 id="在对应的文件夹中添加新有项"><a href="#在对应的文件夹中添加新有项" class="headerlink" title="在对应的文件夹中添加新有项"></a>在对应的文件夹中添加新有项</h4><p>　　git status<br>　　4、提交<br>　　git add mmm.sss //mmm为文件名称，sss为文件拓展名（常用git add .）<br>　　git commit -m “hhh” //hhh为git commit 提交信息，是对这个提交的概述</p>
<p>　　git log//用于查看提交日志<br>　　git push //更新GitHub上的仓库</p>
<h4 id="用git创建仓库"><a href="#用git创建仓库" class="headerlink" title="用git创建仓库"></a>用git创建仓库</h4><p>　　mkdir nnn //仓库名</p>
<p>　　cd hhh</p>
<p>　　git init //初始化仓库</p>
<p>　　git status //查看仓库状态</p>
<p>　　touch README.md //创建READEME.md文件</p>
<p>　　git add ERADME.md //添加ERADME.md至暂存区</p>
<p>　　git commit -m “hhh” //如果想要提交信息记录的更详细，请不要加 -m</p>
<p>　　git log –pretty=short //加–pretty=short 只显示提交信息的第一行</p>
<p>　　git log ggg //ggg是指指定的文件或目录，用于查看指定的目录、文件的日志</p>
<p>　　git log -p //查看提交所带来的改动</p>
<p>　　git log -p ggg //查看指定文件的改动</p>
<p>　　git diff //可以查看工作树，暂存区，最新提交之间的差别</p>
<p>　　git diff HEAD //查看工作树与最新提交的差别</p>
<h4 id="分支操作"><a href="#分支操作" class="headerlink" title="分支操作"></a>分支操作</h4><p>　　git branch //显示分支一览表，同时确认当前所在的分支</p>
<p>　　git checkout -b aaa //创建名为aaa的分支，并且切换到aaa分支<br>　　（git branch aaa //创建名为aaa的分支<br>　　git checkout aaa // 切换到aaa分支<br>　　）能和git branch -b aaa 得到同样的效果</p>
<p>　　git checkout - //切换到上一分支</p>
<h4 id="合并分支"><a href="#合并分支" class="headerlink" title="合并分支"></a>合并分支</h4><p>　　git checkout master //切换到master分支</p>
<p>　　git merge –no–ff aaa // 加–no–ff 参数可以在历史记录中明确地记录本次分支的合并</p>
<p>　　git log –graph //以图表形式查看分支</p>
<h4 id="更改提交的操作"><a href="#更改提交的操作" class="headerlink" title="更改提交的操作"></a>更改提交的操作</h4><p>　　git reset //回溯历史版本</p>
<p>　　git reset –hard //回溯到指定状态，只要提供目标时间点的哈希值</p>
<h4 id="推进历史"><a href="#推进历史" class="headerlink" title="推进历史"></a>推进历史</h4><p>　　git reflog //查看仓库的操作日志，找到要推历史的哈希值</p>
<p>　　git checkout master</p>
<p>　　git reset –hrad ddd //ddd为要推进历史的哈希值</p>
<h4 id="修改提交信息-git-commit-–amend"><a href="#修改提交信息-git-commit-–amend" class="headerlink" title="修改提交信息 git commit –amend"></a>修改提交信息 git commit –amend</h4><p>　　压缩历史 git rebase -i 错字漏字等失误称作typo</p>
<p>　　根据以前的步骤在GitHub上创建仓库，应于本地的仓库名相同 GitHub上面创建的仓库的路径为git@github.com: 用户名/仓库名.git</p>
<p>　　git remote add eee git@github.com: 用户名/仓库名.git //添加远程仓库，并将git@github.com: 用户名/仓库名.git远程仓库的名称改为eee</p>
<p>　　git push -u eee master //推送至远程仓库 master分支下 -u 参数可以在推送的同时，将eee仓库的master分支设置为本地仓库的当前分支的的upstream（上游）。添加这个参数，将来运行git pull命令从远程仓库获取内容时，本地仓库的这个分支就可以直接从eee的master<br>分支中获取内容</p>
<p>　　git checkout -b feature d eee/feature d //获取远程的feature d分支到本地仓库，-b参数后面是本地仓库中新建的仓库的名称</p>
<p>　　git pull eee feature d //将本地的feature d分支更新为最新状态</p>
<p>　　在GitHub上面查看两个分支之间的差别，只需要在地址栏中输入<a href="http://github.com/用户名/仓库名/分支1...分支2" target="_blank" rel="external">http://github.com/用户名/仓库名/分支1...分支2</a></p>
<h4 id="查看master分支在最近七天内的差别"><a href="#查看master分支在最近七天内的差别" class="headerlink" title="查看master分支在最近七天内的差别"></a>查看master分支在最近七天内的差别</h4><p>　　<a href="http://github.com/用户名/仓库名/master@{7.day.ago}...master" target="_blank" rel="external">http://github.com/用户名/仓库名/master@{7.day.ago}...master</a> （同样，day，week，month，year都是可以哒）</p>
<h4 id="查看与指定日期之间的差别"><a href="#查看与指定日期之间的差别" class="headerlink" title="查看与指定日期之间的差别"></a>查看与指定日期之间的差别</h4><p>　　<a href="http://github.com/用户名/仓库名/master@{xxxx-xx-xx}...master" target="_blank" rel="external">http://github.com/用户名/仓库名/master@{xxxx-xx-xx}...master</a> （xxxx-xx-xx代表年月日）</p>

        </div>

        <blockquote class="post-copyright">
    <div class="content">
        
<span class="post-time">
    最后更新时间：<time datetime="2020-01-13T15:17:51.904Z" itemprop="dateUpdated">2020-01-13 23:17:51</time>
</span><br>


        
        谢谢浏览，我会继续努力的，示例：<a href="/2018/03/11/git版本更新/" target="_blank" rel="external">http://yoursite.com/2018/03/11/git版本更新/</a>
        
    </div>
    <footer>
        <a href="http://yoursite.com">
            <img src="/img/avatar.jpg" alt="BingZhenhuang">
            BingZhenhuang
        </a>
    </footer>
</blockquote>

        
<div class="page-reward">
    <a id="rewardBtn" href="javascript:;" class="page-reward-btn waves-effect waves-circle waves-light">赏</a>
</div>



        <div class="post-footer">
            
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/git常用命令/">git常用命令</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/git推送失败/">git推送失败</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/git更新/">git更新</a></li></ul>


            
<div class="page-share-wrap">
    

<div class="page-share" id="pageShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=http://yoursite.com/2018/03/11/git版本更新/&title=《git版本更新&常用命令》 — 小方块 - hhardyy.com&pic=http://yoursite.com/img/avatar.jpg" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=http://yoursite.com/2018/03/11/git版本更新/&title=《git版本更新&常用命令》 — 小方块 - hhardyy.com&source=今晚在推送项目的时候遇到了Git推送失败：HttpRequestException
" data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http://yoursite.com/2018/03/11/git版本更新/" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《git版本更新&常用命令》 — 小方块 - hhardyy.com&url=http://yoursite.com/2018/03/11/git版本更新/&via=http://yoursite.com" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=http://yoursite.com/2018/03/11/git版本更新/" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>



    <a href="javascript:;" id="shareFab" class="page-share-fab waves-effect waves-circle">
        <i class="icon icon-share-alt icon-lg"></i>
    </a>
</div>



        </div>
    </div>

    
<nav class="post-nav flex-row flex-justify-between">
  
    <div class="waves-block waves-effect prev">
      <a href="/2018/04/11/网络安全之数据包截取原理/" id="post-prev" class="post-nav-link">
        <div class="tips"><i class="icon icon-angle-left icon-lg icon-pr"></i> Prev</div>
        <h4 class="title">网络安全之数据包截取原理</h4>
      </a>
    </div>
  

  
    <div class="waves-block waves-effect next">
      <a href="/2018/03/10/vue2-0我踩过的坑，希望你别踩/" id="post-next" class="post-nav-link">
        <div class="tips">Next <i class="icon icon-angle-right icon-lg icon-pl"></i></div>
        <h4 class="title">vue2.0我踩过的坑，希望你别踩</h4>
      </a>
    </div>
  
</nav>



    














</article>

<div id="reward" class="page-modal reward-lay">
    <a class="close" href="javascript:;"><i class="icon icon-close"></i></a>
    <h3 class="reward-title">
        <i class="icon icon-quote-left"></i>
        🤠 请我喝可乐！
        <i class="icon icon-quote-right"></i>
    </h3>
    <div class="reward-content" style="width:50%">
        
        <div class="reward-code" style="text-align:center">
            <div style="width:300px;margin:0px auto;">
               <img id="rewardCode" style="width:50%;height:60%;display:block; margin:0px auto;" src="/img/alipay.jpg" alt="支付宝打赏二维码">
               <span style="display:inline-block; margin-bottom:20px;">0.88(支付宝 aliPay)</span>
               <img id="rewardCode" style="width:50%;height:60%;display:block; margin:0px auto;" src="/img/wechat.jpg" alt="微信打赏二维码">
               <span style="display:inline-block;">0.88(微信 weChat)</span>
            </div>
        </div>
    </div>
</div>



</div>

        <script>
!function(e,t,a){function n(){c(".heart{width: 10px;height: 10px;position: fixed;background: #f00;transform: rotate(45deg);-webkit-transform: rotate(45deg);-moz-transform: rotate(45deg);}.heart:after,.heart:before{content: '';width: inherit;height: inherit;background: inherit;border-radius: 50%;-webkit-border-radius: 50%;-moz-border-radius: 50%;position: fixed;}.heart:after{top: -5px;}.heart:before{left: -5px;}"),o(),r()}function r(){for(var e=0;e<d.length;e++)d[e].alpha<=0?(t.body.removeChild(d[e].el),d.splice(e,1)):(d[e].y--,d[e].scale+=.004,d[e].alpha-=.013,d[e].el.style.cssText="left:"+d[e].x+"px;top:"+d[e].y+"px;opacity:"+d[e].alpha+";transform:scale("+d[e].scale+","+d[e].scale+") rotate(45deg);background:"+d[e].color+";z-index:99999");requestAnimationFrame(r)}function o(){var t="function"==typeof e.onclick&&e.onclick;e.onclick=function(e){t&&t(),i(e)}}function i(e){var a=t.createElement("div");a.className="heart",d.push({el:a,x:e.clientX-5,y:e.clientY-5,scale:1,alpha:1,color:s()}),t.body.appendChild(a)}function c(e){var a=t.createElement("style");a.type="text/css";try{a.appendChild(t.createTextNode(e))}catch(t){a.styleSheet.cssText=e}t.getElementsByTagName("head")[0].appendChild(a)}function s(){return"rgb("+~~(255*Math.random())+","+~~(255*Math.random())+","+~~(255*Math.random())+")"}var d=[];e.requestAnimationFrame=function(){return e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(e){setTimeout(e,1e3/60)}}(),n()}(window,document);
</script>
<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<script>
    function secondToDate(second) {
        if (!second) {
            return 0;
        }
        var time = new Array(0, 0, 0, 0, 0);
        if (second >= 365 * 24 * 3600) {
            time[0] = parseInt(second / (365 * 24 * 3600));
            second %= 365 * 24 * 3600;
        }
        if (second >= 24 * 3600) {
            time[1] = parseInt(second / (24 * 3600));
            second %= 24 * 3600;
        }
        if (second >= 3600) {
            time[2] = parseInt(second / 3600);
            second %= 3600;
        }
        if (second >= 60) {
            time[3] = parseInt(second / 60);
            second %= 60;
        }
        if (second > 0) {
            time[4] = second;
        }
        return time;
    }</script>
<script type="text/javascript" language="javascript">
    function setTime() {
        var create_time = Math.round(new Date(Date.UTC(2017, 08, 18, 11, 42, 23)).getTime() / 1000);
        var timestamp = Math.round((new Date().getTime() + 8 * 60 * 60 * 1000) / 1000);
        currentTime = secondToDate((timestamp - create_time));
        currentTimeHtml = 'Running：' + currentTime[0] + '年 ' + currentTime[1] + '天 '
                + currentTime[2] + '时 ' + currentTime[3] + '分 ' + currentTime[4]
                + '秒';
        document.getElementById("htmer_time").innerHTML = currentTimeHtml;
    }    setInterval(setTime, 1000);
</script>
<footer class="footer">
    <div class="top">
        

        <p>
          <span id="busuanzi_container_page_pv">
             [&nbsp;浏览量：&nbsp;<span id="busuanzi_value_page_pv"></span>&nbsp;]
          </span>
        </p>
    </div>
    <div class="bottom">
        <p>
        <span>BingZhenhuang &copy; 2017 - 2020</span>
            <span>
                
                Power by <a href="https://hhardyy.github.io/" target="_blank">zhen On August 8</a> 
            </span>
            <span id="htmer_time" "></span>
        </p>
    </div>
</footer>

    </main>
    <div class="mask" id="mask"></div>
<a href="javascript:;" id="gotop" class="waves-effect waves-circle waves-light"><span class="icon icon-lg icon-chevron-up"></span></a>



<div class="global-share" id="globalShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=http://yoursite.com/2018/03/11/git版本更新/&title=《git版本更新&常用命令》 — 小方块 - hhardyy.com&pic=http://yoursite.com/img/avatar.jpg" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=http://yoursite.com/2018/03/11/git版本更新/&title=《git版本更新&常用命令》 — 小方块 - hhardyy.com&source=今晚在推送项目的时候遇到了Git推送失败：HttpRequestException
" data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http://yoursite.com/2018/03/11/git版本更新/" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《git版本更新&常用命令》 — 小方块 - hhardyy.com&url=http://yoursite.com/2018/03/11/git版本更新/&via=http://yoursite.com" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=http://yoursite.com/2018/03/11/git版本更新/" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>


<div class="page-modal wx-share" id="wxShare">
    <a class="close" href="javascript:;"><i class="icon icon-close"></i></a>
    <p>扫一扫，分享到微信</p>
    <img src="" alt="微信分享二维码">
</div>




    <script src="//cdn.bootcss.com/node-waves/0.7.4/waves.min.js"></script>
<script>
var BLOG = { ROOT: '/', SHARE: true, REWARD: true };


</script>

<script src="//unpkg.com/hexo-theme-material-indigo@latest/js/main.min.js"></script>


<div class="search-panel" id="search-panel">
    <ul class="search-result" id="search-result"></ul>
</div>
<template id="search-tpl">
<li class="item">
    <a href="{path}" class="waves-block waves-effect">
        <div class="title ellipsis" title="{title}">{title}</div>
        <div class="flex-row flex-middle">
            <div class="tags ellipsis">
                {tags}
            </div>
            <time class="flex-col time">{date}</time>
        </div>
    </a>
</li>
</template>

<script src="//unpkg.com/hexo-theme-material-indigo@latest/js/search.min.js" async></script>








<script>
(function() {
    var OriginTitile = document.title, titleTime;
    document.addEventListener('visibilitychange', function() {
        if (document.hidden) {
            document.title = '(•‾̑⌣‾̑•)✧˖°回来看我';
            clearTimeout(titleTime);
        } else {
            document.title = '(゜-゜)つロ欢迎回来';
            titleTime = setTimeout(function() {
                document.title = OriginTitile;
            },2000);
        }
    });
})();
</script>



</body>
</html>
